package com.currency.mall.netWork.api;

import com.currency.mall.entity.LoginBean;
import com.mifengs.commonbusines.entity.ResponseBean;
import com.currency.mall.Constant;

import java.util.Map;

import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2018/12/11.
 */

public interface LoginApi {

    @FormUrlEncoded
    @POST(Constant.REGISTER)
    Observable<ResponseBean> register(
            @FieldMap Map<String, String> map
    );

    @FormUrlEncoded
    @POST(Constant.QUICK_LOGIN)
    Observable<LoginBean> quickLogin(
            @FieldMap Map<String, String> map
    );

    @FormUrlEncoded
    @POST(Constant.LOGIN)
    Observable<LoginBean> login(
            @FieldMap Map<String, String> map
    );


    @FormUrlEncoded
    @POST(Constant.SENDCODE)
    Observable<ResponseBean> sendcode(
            @FieldMap Map<String, String> map
    );

    @FormUrlEncoded
    @POST(Constant.CHECKCODE)
    Observable<ResponseBean> checkcode(
            @FieldMap Map<String, String> map
    );

    @FormUrlEncoded
    @POST(Constant.SET_PASSWORD)
    Observable<ResponseBean> setPwd(
            @FieldMap Map<String, String> map
    );


    @GET(Constant.LOGOUT)
    Observable<ResponseBean> logout(
    );

    @FormUrlEncoded
    @POST(Constant.UPDATE_PWD)
    Observable<ResponseBean> updatePwd(
            @FieldMap Map<String, Object> map
    );



}
